package net.sourceforge.peers.sip.transport;

import net.sourceforge.peers.sip.RFC3261;

/**
 *响应消息体
 *响应消息体组成  sipVersion  +  status code  + description  + 请求头字段 + 请求体
 * @author Mr.Yan
 */
public class SipResponse extends SipMessage {
    protected int statusCode;
    protected String reasonPhrase;
    
    public SipResponse(int statusCode, String reasonPhrase) {
        this.statusCode = statusCode;
        this.reasonPhrase = reasonPhrase;
    }
    
    @Override
    public String toString() {
        return RFC3261.DEFAULT_SIP_VERSION + ' ' + statusCode +
                ' ' + reasonPhrase + RFC3261.CRLF +
                super.toString();
    }

    public int getStatusCode() {
        return statusCode;
    }
    
    public String getReasonPhrase() {
        return reasonPhrase;
    }

}
